<?php
class login extends database{
    protected $_table = "tbl_user";
    function checklogin($name,$pass){
        $sql = "SELECT * FROM $this->_table WHERE user_name = '".$name."' AND user_pass = '".$pass."'";
        $this->query($sql);
        if($this->num_rows()>0){
            return $this->fetch();
        }else{
            return FALSE;
        }
    }
}